package com.zzzy.doc.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 公文提醒消息
 *
 * @author fc
 * @since 2024-09-04
 */
@Getter
@Setter
@TableName("doc_notify_message")
@Schema(description = "公文提醒消息")
public class DocNotifyMessage {

    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "来源主体（公文ID、收文记录ID）")
    @TableField("source_id")
    private Long sourceId;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "业务模块")
    @TableField("module")
    private String module;

    @Schema(description = "消息内容")
    @TableField("message")
    private String message;

    @Schema(description = "状态（未读、已读）")
    @TableField("`status`")
    private String status;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;
}
